import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { SFSchema } from '@delon/form';
import { ApiService } from '@core/services/api';
import { HttpClient } from '@angular/common/http';
import { NzMessageService, NzModalRef } from 'ng-zorro-antd';
import { ColumnType, SPage, TablePageComponent } from '@shared/components/table-page/table-page.component';

@Component({
  selector: 'app-person-rooms',
  templateUrl: './person-rooms.component.html',
  styles: []
})
export class PersonRoomsComponent implements OnInit {
 //房间信息列表
 @ViewChild('st', { static: false }) st: TablePageComponent;
 @Input() idCardNo : string;
 @Input()
 set list(value){
   if(!value) return;
   this.arr=value;
 }
 arr:[] = [];
 config: SPage = {
  columns: [
    {
      index: 'roomNumber',
      title: '门牌号',
    },
    {
      index: 'roomName',
      title: '房间名称',
    },
    {
      index: 'roomFloor',
      title: '所在层数',
    },
    {
      index: 'houseName',
      title: '区域名称',
      width:500
    },
   
  ],
  data:[],
  ps: 5,
};
constructor(
  private api: ApiService,
  private http: HttpClient,
  private msg: NzMessageService,
  private modalRef: NzModalRef
) { }

  ngOnInit() {
        this.config.data = this.arr;
  }

}
